home *** CD-ROM | disk | FTP | other *** search
- /* slots.c - list the slots in a Mac II
-
- Vinnie Moscaritolo
- V.M.Engineering
- 125 CambridgePark Drive
- Cambridge, MA 02140
- */
-
- #include <Slots.h>
-
- main(){
- SpBlock SPB,SPB1;
- char Last_Slot = 0;
-
- printf("Slot ID Cat Type SW HW\n");
- /* Setup Slot Manager Info */
- SPB.spSlot = 0;
- SPB.spCategory = 0;
- SPB.spCType = 0;
- SPB.spDrvrSW = 0;
- SPB.spDrvrHW = 0;
- SPB.spTBMask = 0xf;
- SPB.spID = 0;
- SPB.spExtDev = 0;
-
- /* Find Card Slot */
- while (SNextTypeSRsrc(&SPB) == noErr) {
- // if((SPB.spSlot != Last_Slot) && Last_Slot ) printf("---\n");
- printf("%X ", SPB.spSlot);
- printf(" %02X",(SPB.spID & 0xFF) );
- printf(" %04X",SPB.spCategory);
- printf(" %04X",SPB.spCType);
- printf(" %04X",SPB.spDrvrSW);
- printf(" %04X",SPB.spDrvrHW);
-
- SPB1.spsPointer = SPB.spsPointer;
- SPB1.spID = 2;
- SGetCString(&SPB1);
- printf(" %s\n",SPB1.spResult);
-
- Last_Slot = SPB.spSlot;
- }
- printf("\n");
- }
-
- /*
- c slots.c -b -w
- Link -w -c 'MPS ' -t MPST slots.c.o "{Libraries}"stubs.o "{CLibraries}"CRuntime.o "{Libraries}"Interface.o "{CLibraries}"StdCLib.o "{CLibraries}"CInterface.o "{Libraries}"ToolLibs.o -o slots
- slots
- */